package com.redoor.app.stake.auth.dao;

import com.redoor.app.stake.auth.model.BaseRole;
import com.redoor.app.stake.auth.model.BaseRoleCriteria;
import com.redoornetwork.framework.mybatis.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BaseRoleMapper extends Mapper<BaseRole> {

    public List<BaseRole> queryRoles(BaseRoleCriteria criteria);

    public int queryRolesByUser(BaseRoleCriteria criteria);

    /**
     * 根据uuid查询用户权限
     * @Author zhangYiHang
     * @Date 2018/3/7 18:08
     */
    List<BaseRole> qryUserRoleByUuid(@Param("uuid") String uuid);
    /**
     * 角色主页面查询(名称模糊查询)
     * @Author zhangYiHang
     * @Date 2018/3/15 16:53
     */
    List<BaseRole> qryRole(BaseRole role);
}